﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iLangl.Plugin
{
	public class PluginAuthenticationService : IAuthenticationService
	{
		#region IAuthenticationService Members

		public string Authenticate(String siteID)
		{
			IPluginConfiguration pc = ConfigurationFactory.Instance.CreateConfigurationManager().GetPluginConfiguration(siteID);
			
			return Facade.Instance.AuthenticationService.CreateSession(
				pc.AccountUserName,
				pc.AccountPassword);
		}

		#endregion
	}
}
